<template>
    <div id="">
        <!-- 要配合Suspense使用 -->
        <Suspense>
            <template #default>
                <A></A>
            </template>
            <!-- A组件没有加载完之前会显示fallback里的内容 -->
            <template #fallback>
                <div>
                    Loading.....
                </div>
            </template>
        </Suspense>
    </div>
</template>

 <script setup lang="ts">
import { defineAsyncComponent } from 'vue'
//  引入异步组件A
const A = defineAsyncComponent(() => import('../A/index.vue'))
</script>

<style lang="less" scoped>
</style>